<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<title>订单页面</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.min.js"></script>
<!-- Custom Theme files -->
<!--theme-style-->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />	
<!--//theme-style-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="New Store Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!--fonts-->
<link href='http://fonts.useso.com/css?family=Lato:100,300,400,700,900' rel='stylesheet' type='text/css'>
<link href='http://fonts.useso.com/css?family=Roboto:400,100,300,500,700,900' rel='stylesheet' type='text/css'><!--//fonts-->
<!-- start menu -->
<link href="css/memenu.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/memenu.js"></script>
<script>$(document).ready(function(){$(".memenu").memenu();});</script>
<script src="js/simpleCart.min.js"> </script>
</head>
<body>
<!--header-->
<div class="header">
	<div class="header-top">
		<div class="container">
			<div class="search">
					<form>
						<input type="text" value="Search " onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Search';}">
						<input type="submit" value="Go">
					</form>
			</div>
			<div class="header-left">		
					<ul>
						<s:if test="#session.exitcustomer!=null">
						<li ><font color="white" size="3">欢迎您,<s:property value="#session.exitcustomer"/></font></li>
                          &nbsp &nbsp
                          <li><a  href="${pageContext.request.contextPath}/login_loginout.action">注销</a></li>
                          &nbsp &nbsp
                     </s:if>  
					<s:else>
						<li ><a href="${pageContext.request.contextPath}/login_loginpage.action">登陆</a></li>
						<li><a  href="${pageContext.request.contextPath}/login_customerRegist.action">注册</a></li>
					</s:else>
					
</li>

					</ul>
					<div class="cart box_1">
						<a href="checkout.html">
						<h3> <div class="total">
							<span class="simpleCart_total"></span> (<span id="simpleCart_quantity" class="simpleCart_quantity"></span> items)</div>
							<img src="images/cart.png" alt=""/></h3>
						</a>
												<p><a href="javascript:;" class="simpleCart_empty">购物车</a></p>

					</div>
					<div class="clearfix"> </div>
			</div>
				<div class="clearfix"> </div>
		</div>
		</div>
		<div class="container">
			<div class="head-top">
				<div class="logo">
					<a href="index.html"><img src="images/logo.png" alt=""></a>	
				</div>
	 <div class=" h_menu4">
					<ul class="memenu skyblue">
					  <li class="active grid"><a class="color8" href="index.html">首页</a></li>	
				   
			  </ul> 
			</div>
				
				<div class="clearfix"> </div>
		</div>
		</div>

	</div>

	
<div class="container">
	<div class="check">	 
			 <h2><font color="#FF6633">订单页面</font></h2>
		 <div class="col-md-9 cart-items">
			
				<script>$(document).ready(function(c) {
					$('.close1').on('click', function(c){
						$('.cart-header').fadeOut('slow', function(c){
							$('.cart-header').remove();
						});
						});	  
					});
			   </script>
				  <!-- <div class="cart-header">
				 <div class="close1"> </div>
				 <div class="cart-sec simpleCart_shelfItem">
						<div class="cart-item cyc">
							 <img src="images/pic1.jpg" class="img-responsive" alt=""/>
						</div>
				 <div class="cart-item-info">
						<h3><a href="#">Mountain Hopper(XS R034)</a><span>Model No: 3578</span></h3>
						<ul class="qty">
							<li><p>Size : 5</p></li>
							<li><p>Qty : 1</p></li>
						</ul>
						
							 <div class="delivery">
							 <p>Service Charges : Rs.100.00</p>
							 <span>Delivered in 2-3 bussiness days</span>
							 <div class="clearfix"></div>
				        </div>	
					   </div> 
					   <div class="clearfix"></div>
											
				  </div>
			 </div>--> 
		 <script type="text/javascript">
			 $(document).ready(function(c) {
					$('.close2').on('click', function(c){
							$('.cart-header2').fadeOut('slow', function(c){
						$('.cart-header2').remove();
					});
					});	  
					});
			 </script>
			<!-- 	 <div class="cart-header2">
				 <div class="close2"> </div>
				  <div class="cart-sec simpleCart_shelfItem">
				<div class="cart-item cyc">
							 <img src="images/pic2.jpg" class="img-responsive" alt=""/>
						</div>
					   <div class="cart-item-info">
						<h3><a href="#">Mountain Hopper(XS R034)</a><span>Model No: 3578</span></h3>
						<ul class="qty">
							<li><p>Size : 5</p></li>
							<li><p>Qty : 1</p></li>
						</ul>
							 <div class="delivery">
							 <p>Service Charges : Rs.100.00</p>
							 <span>Delivered in 2-3 bussiness days</span>
							 <div class="clearfix"></div>
				        </div>	
					   </div>-->
					   <script type="text/javascript">
					       function validateorder(){
					  
					       //收货人的校验
					     var ordername = document.getElementById("ordername").value;
					       if(ordername==""){
					       document.getElementById("resultordername").innerHTML="<font color='#cc0000'>收货人不能为空 </font>";
					        return false;
					       }
					       //收货地址
					      var addr = document.getElementById("addr").value;
					     
					      //alert(addr);
					       if(addr==""){
					     
					       document.getElementById("resultaddr").innerHTML="<font color='#c0000'>收货地址不能为空 </font>";
					       return false;
					       }
					   //邮政编码校验
					       var postcode = document.getElementById("postcode").value;
					       //邮政编码的校验  开头不能为零，共6位
					       var postcode1= /^[1-9][0-9]{5}$/;
					       if(postcode==""){
					       document.getElementById("resultpostcode").innerHTML="<font color='#cc0000'>邮政编码不能为空</font>";
					         return false;
					       }else {
					       if(!postcode1.test(postcode)){
					         document.getElementById("resultpostcode").innerHTML="<font color='#cc0000'>邮政编码的格式不正确</font>";
					        return false;
					      
					       }
					       }
					       var phone = document.getElementById("phone").value;
					       var phone1 = /^(13[0-9]{9})|(15[89][0-9]{8})$/ ;//手机号码 13开头 和158开头 ，共11位
					       //手机号码校验
					       if(phone==""){
					           document.getElementById("resultphone").innerHTML="<font color='#cc0000'>手机号码不能为空</font>";
					             return false;
					       }else{
					       if(!phone1.test(phone)){
					          document.getElementById("resultphone").innerHTML="<font color='#cc00'>手机号码格式不正确 </font>";
					          return false;
					          
					       }  
					  }
					    
					       }
					          
					           function  validate(){
					         //非空校验
					         //收货人
					         		       //收货人的校验
					     var ordername = document.getElementById("ordername").value;
					       if(ordername==""){
					       document.getElementById("resultordername").innerHTML="<font color='#cc0000'>收货人不能为空 </font>";
					        return false;
					       }
					       //收货地址
					      var addr = document.getElementById("addr").value;
					     
					      //alert(addr);
					       if(addr==""){
					     
					       document.getElementById("resultaddr").innerHTML="<font color='#c0000'>收货地址不能为空 </font>";
					       return false;
					       }
					   //邮政编码校验
					       var postcode = document.getElementById("postcode").value;
					       //邮政编码的校验  开头不能为零，共6位
					       var postcode1= /^[1-9][0-9]{5}$/;
					       if(postcode==""){
					       document.getElementById("resultpostcode").innerHTML="<font color='#cc0000'>邮政编码不能为空</font>";
					         return false;
					       }else {
					       if(!postcode1.test(postcode)){
					         document.getElementById("resultpostcode").innerHTML="<font color='#cc0000'>邮政编码的格式不正确</font>";
					        return false;
					      
					       }
					       }
					       var phone = document.getElementById("phone").value;
					       var phone1 = /^(13[0-9]{9})|(15[89][0-9]{8})$/ ;//手机号码 13开头 和158开头 ，共11位
					       //手机号码校验
					       if(phone==""){
					           document.getElementById("resultphone").innerHTML="<font color='#cc0000'>手机号码不能为空</font>";
					             return false;
					       }else{
					       if(!phone1.test(phone)){
					          document.getElementById("resultphone").innerHTML="<font color='#cc00'>手机号码格式不正确 </font>";
					          return false;
					          
					       }  
					  }
					       } 
					       
					   
					   </script>
					   <p><h1>收货相关信息</h1></p>
					   <form action="${pageContext.request.contextPath}/order_addorder.action" method="post">
					  
					     <table border="1px" width="60%" height="300%" >
					    <tr align="center">
					        <td>
					         .收货人
					       </td>
					       <td>
					         <input type="text" name="ordername" id="ordername" onblur="return validateorder()"/>
					         <div id="resultordername"></div>
					       </td>
					    </tr>
					       <tr align="center">
					        <td>
					         .收货地址
					       </td>
					       <td>
					         <input type="text" name="addr" id="addr" onblur="return validateorder()"/>
					         <div id="resultaddr"></div>
					       </td>
					    </tr>
					          <tr  align="center">
					        <td>
					         .邮政编码
					       </td>
					       <td>
					         <input type="text"  id="postcode" name="postcode" onblur="return validateorder()"/>
					       <div id="resultpostcode"></div>
					       </td>
					     
					         
					       
					    </tr>
					             <tr align="center">
					        <td>
					         联系电话
					       </td>
					       <td>
					         <input type="text"  id="phone"  name="phone" onblur="return validateorder()"/>
					         <div id="resultphone"></div>
					       </td>
					    </tr>
					    <tr  align="center">
					       <td colspan="2"> <input type="submit" value="确认收货地址" onclick="return validate()"/></td>
					    </tr>
					   </table>
					
					   </form>
					   <h2>商品订单</h2>
					
					 
						 <form action="#" method="post">
					      <table border="0px" width="100%" height="200%">
						   <tr align="center" style="background:#e5f1f4;height:65px;">
						   
						       <td>　商品信息</td>
						       <td>　单价　</td>
						       <td>　数量　</td>
						       <td>　金额　</td>
						      
						   </tr>
						  <s:iterator var="c" value="#session.exitsbigCart.cartItems" status="st"> 
						 <tr>  
						    <td  align="left" style="background:#CCCCFF;height:65px;">
						     网上图书管理系统，订单<s:property value="#st.index+1"/>
						     </td>
						     </tr>
						   <tr align="center" style="height:65px;">
					     
						   
						      <td><s:property value="#c.book.bname"/></td>
						      <td><s:property value="#c.book.price"/>元</td>
						      
						        <td><s:property value="#c.number"/></td>
						      <td><s:property value="#c.totalPrice"/>元</td>
						   
						   </tr>
						 </s:iterator>  
						   
						   
						
						
						   <tr style="background:#e5f1f4;">
						      <td colspan="4" align="right">
						   
					                          已选择<s:property value="#session.exitsbigCart.cartItemsLength"/>件商品
					                      
						      </td>
						      <td align="center">
						             总计金额:￥<s:property value="#session.exitsbigCart.addTotalPrice"/>元
						      </td>
						      <td align="center">
						             <input type="submit" value="结　算" style="background:url(images/an1.png);width:100px;height:50px;font-weight:bold;color:white;"/>
						      </td>
						   </tr>
						 </table>    
					</form>
                 
						
						     
						    
						 </table>    
					</form>
                 
					   
					   <div class="clearfix"></div>
											
				  </div>
			  </div>
			  		
		 </div> 
		 <!--  <div class="col-md-3 cart-total">
			 <a class="continue" href="#">Continue to basket</a>
			 <div class="price-details">
				 <h3>Price Details</h3>
				 <span>Total</span>
				 <span class="total1">6200.00</span>
				 <span>Discount</span>
				 <span class="total1">---</span>
				 <span>Delivery Charges</span>
				 <span class="total1">150.00</span>
				 <div class="clearfix"></div>				 
			 </div>	
			 <ul class="total_price">
			   <li class="last_price"> <h4>TOTAL</h4></li>	
			   <li class="last_price"><span>6350.00</span></li>
			   <div class="clearfix"> </div>
			 </ul>
			
			 
			 <div class="clearfix"></div>
			 <a class="order" href="#">Place Order</a>
			 <div class="total-item">
				 <h3>OPTIONS</h3>
				 <h4>COUPONS</h4>
				 <a class="cpns" href="#">Apply Coupons</a>
				 <p><a href="#">Log In</a> to use accounts - linked coupons</p>
			 </div>
			</div>
		
			<div class="clearfix"> </div>
	 </div>
	 </div>
 -->

<!--//content-->
<div class="footer">
				<div class="container">
			<div class="footer-top-at">
			
				<div class="col-md-4 amet-sed">
				<h4>MORE INFO</h4>
				<ul class="nav-bottom">
						<li><a href="#">How to order</a></li>
						<li><a href="#">FAQ</a></li>
						<li><a href="contact.html">Location</a></li>
						<li><a href="#">Shipping</a></li>
						<li><a href="#">Membership</a></li>	
					</ul>	
				</div>
				<div class="col-md-4 amet-sed ">
				<h4>CONTACT US</h4>
				
					<p>
Contrary to popular belief</p>
					<p>The standard chunk</p>
					<p>office:  +12 34 995 0792</p>
					<ul class="social">
						<li><a href="#"><i> </i></a></li>						
						<li><a href="#"><i class="twitter"> </i></a></li>
						<li><a href="#"><i class="rss"> </i></a></li>
						<li><a href="#"><i class="gmail"> </i></a></li>
						
					</ul>
				</div>
				<div class="col-md-4 amet-sed">
					<h4>Newsletter</h4>
					<p>Sign Up to get all news update
and promo</p>
					<form>
						<input type="text" value="" onfocus="this.value='';" onblur="if (this.value == '') {this.value ='';}">
						<input type="submit" value="Sign up">
					</form>
				</div>
				<div class="clearfix"> </div>
			</div>
		</div>
		<div class="footer-class">
		<p >Copyright &copy; 2015.Company name All rights reserved.More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></p>
		</div>
		</div>
</body>
</html>
			